/**
 * 存放数据结构
 */

//子设备的数据结构
export class SubDeviceClass{
  IP:string              //设备IP地址
  port:number            //设备端口号
  name:string            //设备名称
  status:boolean         //设备状态
  belongRegion:string    //设备所属区域
  batteryRemainCapacity:number  //电池剩余电量

  constructor(IP:string,port:number,name:string,status:false,belongRegion:string,batteryRemainCapacity:number) {
    this.IP = IP
    this.port = port
    this.name = name
    this.status = status
    this.belongRegion = belongRegion
    this.batteryRemainCapacity = batteryRemainCapacity
  }
}


//设备数据结构
export class DeviceClass{
  name:string
  subDevices:Array<SubDeviceClass>

  constructor(name:string,subDevices:Array<SubDeviceClass>) {
    this.name = name
    this.subDevices = subDevices
  }
}